3.8 \(\int \sinh (a+b x-c x^2) \, dx\)

Optimal. Leaf size=91 \[ \frac{\sqrt{\pi } e^{-a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}}-\frac{\sqrt{\pi } e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}} \]

[Out]

-(E^(a + b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c]) + (E^(-a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b
- 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c])

________________________________________________________________________________________

Rubi [A]  time = 0.0323885, antiderivative size = 91, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5374, 2234, 2205, 2204} \[ \frac{\sqrt{\pi } e^{-a-\frac{b^2}{4 c}} \text{Erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}}-\frac{\sqrt{\pi } e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}} \]

Antiderivative was successfully verified.

[In]

Int[Sinh[a + b*x - c*x^2],x]

[Out]

-(E^(a + b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c]) + (E^(-a - b^2/(4*c))*Sqrt[Pi]*Erfi[(b
- 2*c*x)/(2*Sqrt[c])])/(4*Sqrt[c])

Rule 5374

Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] - Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rubi steps

\begin{align*} \int \sinh \left (a+b x-c x^2\right ) \, dx &=\frac{1}{2} \int e^{a+b x-c x^2} \, dx-\frac{1}{2} \int e^{-a-b x+c x^2} \, dx\\ &=-\left (\frac{1}{2} e^{-a-\frac{b^2}{4 c}} \int e^{\frac{(-b+2 c x)^2}{4 c}} \, dx\right )+\frac{1}{2} e^{a+\frac{b^2}{4 c}} \int e^{-\frac{(b-2 c x)^2}{4 c}} \, dx\\ &=-\frac{e^{a+\frac{b^2}{4 c}} \sqrt{\pi } \text{erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}}+\frac{e^{-a-\frac{b^2}{4 c}} \sqrt{\pi } \text{erfi}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{4 \sqrt{c}}\\ \end{align*}

Mathematica [A]  time = 0.0693669, size = 109, normalized size = 1.2 \[ \frac{\sqrt{\pi } \left (\text{Erf}\left (\frac{2 c x-b}{2 \sqrt{c}}\right ) \left (\sinh \left (a+\frac{b^2}{4 c}\right )+\cosh \left (a+\frac{b^2}{4 c}\right )\right )+\text{Erfi}\left (\frac{2 c x-b}{2 \sqrt{c}}\right ) \left (\sinh \left (a+\frac{b^2}{4 c}\right )-\cosh \left (a+\frac{b^2}{4 c}\right )\right )\right )}{4 \sqrt{c}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sinh[a + b*x - c*x^2],x]

[Out]

(Sqrt[Pi]*(Erfi[(-b + 2*c*x)/(2*Sqrt[c])]*(-Cosh[a + b^2/(4*c)] + Sinh[a + b^2/(4*c)]) + Erf[(-b + 2*c*x)/(2*S
qrt[c])]*(Cosh[a + b^2/(4*c)] + Sinh[a + b^2/(4*c)])))/(4*Sqrt[c])

________________________________________________________________________________________

Maple [A]  time = 0.032, size = 79, normalized size = 0.9 \begin{align*} -{\frac{\sqrt{\pi }}{4}{{\rm e}^{-{\frac{4\,ac+{b}^{2}}{4\,c}}}}{\it Erf} \left ( \sqrt{-c}x+{\frac{b}{2}{\frac{1}{\sqrt{-c}}}} \right ){\frac{1}{\sqrt{-c}}}}-{\frac{\sqrt{\pi }}{4}{{\rm e}^{{\frac{4\,ac+{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(-c*x^2+b*x+a),x)

[Out]

-1/4*Pi^(1/2)*exp(-1/4*(4*a*c+b^2)/c)/(-c)^(1/2)*erf((-c)^(1/2)*x+1/2*b/(-c)^(1/2))-1/4*Pi^(1/2)*exp(1/4*(4*a*
c+b^2)/c)/c^(1/2)*erf(-c^(1/2)*x+1/2*b/c^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.52258, size = 691, normalized size = 7.59 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(-c*x^2+b*x+a),x, algorithm="maxima")

[Out]

-1/8*(sqrt(pi)*(2*c*x - b)*b*(erf(1/2*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*(-c)^(3/2)) - 2*c*e^(
-1/4*(2*c*x - b)^2/c)/(-c)^(3/2))*b*e^(a + 1/4*b^2/c)/sqrt(-c) - 1/8*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*sqrt((
2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^2/c)*(-c)^(5/2)) - 4*b*c*e^(-1/4*(2*c*x - b)^2/c)/(-c)^(5/2) - 4*(2*c*
x - b)^3*gamma(3/2, 1/4*(2*c*x - b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(5/2)))*c*e^(a + 1/4*b^2/c)/sqrt(-c) -
1/8*(sqrt(pi)*(2*c*x - b)*b*(erf(1/2*sqrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(3/2)) + 2*e^(1/4*
(2*c*x - b)^2/c)/sqrt(c))*b*e^(-a - 1/4*b^2/c)/sqrt(c) + 1/8*(sqrt(pi)*(2*c*x - b)*b^2*(erf(1/2*sqrt(-(2*c*x -
 b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(5/2)) + 4*b*e^(1/4*(2*c*x - b)^2/c)/c^(3/2) - 4*(2*c*x - b)^3*gamma(
3/2, -1/4*(2*c*x - b)^2/c)/((-(2*c*x - b)^2/c)^(3/2)*c^(5/2)))*sqrt(c)*e^(-a - 1/4*b^2/c) - x*sinh(c*x^2 - b*x
 - a)

________________________________________________________________________________________

Fricas [A]  time = 2.06003, size = 296, normalized size = 3.25 \begin{align*} \frac{\sqrt{\pi } \sqrt{-c}{\left (\cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) - \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )\right )} \operatorname{erf}\left (\frac{{\left (2 \, c x - b\right )} \sqrt{-c}}{2 \, c}\right ) + \sqrt{\pi } \sqrt{c}{\left (\cosh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right ) + \sinh \left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )\right )} \operatorname{erf}\left (\frac{2 \, c x - b}{2 \, \sqrt{c}}\right )}{4 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(-c*x^2+b*x+a),x, algorithm="fricas")

[Out]

1/4*(sqrt(pi)*sqrt(-c)*(cosh(1/4*(b^2 + 4*a*c)/c) - sinh(1/4*(b^2 + 4*a*c)/c))*erf(1/2*(2*c*x - b)*sqrt(-c)/c)
 + sqrt(pi)*sqrt(c)*(cosh(1/4*(b^2 + 4*a*c)/c) + sinh(1/4*(b^2 + 4*a*c)/c))*erf(1/2*(2*c*x - b)/sqrt(c)))/c

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sinh{\left (a + b x - c x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(-c*x**2+b*x+a),x)

[Out]

Integral(sinh(a + b*x - c*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.42254, size = 109, normalized size = 1.2 \begin{align*} -\frac{\sqrt{\pi } \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c}{\left (2 \, x - \frac{b}{c}\right )}\right ) e^{\left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{4 \, \sqrt{c}} + \frac{\sqrt{\pi } \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{-c}{\left (2 \, x - \frac{b}{c}\right )}\right ) e^{\left (-\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{4 \, \sqrt{-c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(-c*x^2+b*x+a),x, algorithm="giac")

[Out]

-1/4*sqrt(pi)*erf(-1/2*sqrt(c)*(2*x - b/c))*e^(1/4*(b^2 + 4*a*c)/c)/sqrt(c) + 1/4*sqrt(pi)*erf(-1/2*sqrt(-c)*(
2*x - b/c))*e^(-1/4*(b^2 + 4*a*c)/c)/sqrt(-c)